<?php
/**
 * Created by PhpStorm.
 * User: gm
 * Date: 2018/12/11
 * Time: 15:39
 */
header("Content-Type:application/json;charset-utf-8");
 if(isset($_REQUEST["gid"])){
     $str=file_get_contents("./data/goods.json");
     $listArr=json_decode($str);
     foreach ($listArr as $item){
         if($item->gid==$_REQUEST["gid"]){
             print_r(json_encode($item));
             return ;
         }
     }
 }